home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: news.annex.com!bjg
- From: bjg@annex.com (Froman)
- Subject: Memory Loss Problem
- Message-ID: <497cc$111a32.23a@news.annex.com>
- Date: Wed, 10 Apr 1996 01:26:50 GMT
- Organization: The Annex! 140 Lines 818.779.5600
- X-Newsreader: TIN [version 1.2 PL2]
-
- ...I'm working on a program using Borland C++ 3.0 that uses file
- directory information, and created a class to store this. Each item of
- this class takes up 20 bytes of memory. I have 2 nearly identical
- routines using this class. One reads the directory of the directory you
- are in. The other reads an ASCII file with the same info. Both use a
- container class (BI_ISVector, I beilieve...its a sorted array of
- pointers). Both work, BUT the one that reads the ASCII has a major
- memory problem. If I use the small memory model, it runs out of memory
- after 19 entries. On the large model (1MB memory, 64k max size of
- array), it can read 155 entries. I cannot seem to trace down the
- problem...I cannot see where an error of 10-20x the amount of memory
- needed could possibly take place. Any ideas?
-
-
-